package com.dotflat.staffExtend.domain;

import com.dotflat.rest.domain.AreableObjectBase;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.util.Date;

@Entity
@Data
@Table(name = "ex_staff_extend_healthy" )
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
public class StaffExtendHealthy extends AreableObjectBase {

    @Column(columnDefinition = "varchar(32)  COMMENT '扩展记录id'")
    private String extendInfoId;

    @ManyToOne
    @JoinColumn(name = "extendInfoId", columnDefinition = "varchar(32) COMMENT '扩展记录id'", insertable = false, updatable = false)
    @JsonIgnore
    private StaffExtendInfo staffExtendInfo;

    @Column(columnDefinition = "datetime default NOW() COMMENT '体检时间'", nullable = false)
    private Date eventTime = new Date();

    @Column(columnDefinition = "varchar(512) COMMENT '图片地址'")
    private String resURL;

//    @Column(columnDefinition = "int default 0   COMMENT '资源类型， 0. 其他    1.图片   2.视频  '")
//    private Integer resType;
    @Column(columnDefinition = "varchar(30) COMMENT '资源类型， 0. 其他    1.图片   2.视频'")
    private String resType;

}
